import org.neodatis.odb.ODBServer;
import org.softmed.neodatis.persistence.impl.ODBPersistenceProvider;
import org.softmed.neodatis.util.id.GenerateIDConfigurator;
import org.softmed.neodatis.util.id.generator.*;
import org.softmed.neodatis.util.provider.*;
import org.softmed.neodatis.util.trigger.TriggerEnvironment;



String aspectODBFileName = "aop.odb";
String aspectODBName = "aop";

server = ClientServerProviderManager.getDefaultServer();
server.registerODB(aspectODBName, mod.path+"/"+aspectODBFileName);
ClientServerProvider csProvider = new ClientServerProvider(server,
		aspectODBName);

GenerateIDConfigurator generateFieldConfig = new GenerateIDConfigurator(
		csProvider);

TriggerEnvironment tenv = new TriggerEnvironment();
tenv.getInserts().add(generateFieldConfig.getGenerateIDTrigger());
server.registerTriggerEnvironments(aspectODBName, tenv);

provider = new ODBPersistenceProvider(csProvider);
name = "aop-provider";



//id setup
pkManager = provider.getPersistenceManager().getPkManager();
pkManager.registerPrimaryKey(Aspect.class, "id");
pkManager.registerPrimaryKey(Advice.class, "id");
pkManager.registerPrimaryKey(Rule.class, "id");

// generator setup
generateFieldConfig.registerGenerator(Aspect.class, "id",new SequentialGenerator());
generateFieldConfig.registerGenerator(Advice.class, "id",new SequentialGenerator());
generateFieldConfig.registerGenerator(Rule.class, "id",	new SequentialGenerator());




